package com.hero.webapp;

import com.hero.servlet.HeroRequest;
import com.hero.servlet.HeroResponse;
import com.hero.servlet.HeroServlet;

import java.util.HashMap;
import java.util.Map;

/**
 * 业务Servlet
 */
public class SkuServlet extends HeroServlet {
    @Override
    public void doGet(HeroRequest request, HeroResponse response) throws Exception {
        String uri = request.getUri();
        String path = request.getPath();
        String method = request.getMethod();
        String name = request.getParameter("name");
        Map<String,Object> map = new HashMap<>();
        map.put("uri",uri);
        map.put("path",path);
        map.put("method",method);
        map.put("param",name);

        response.write(map);
    }

    @Override
    public void doPost(HeroRequest request, HeroResponse response) throws Exception {
        doGet(request, response);
    }


}
